package com.huaboot.system.service;

import com.huaboot.commont.page.PageResult;
import com.huaboot.framework.security.user.LoginUser;
import com.huaboot.system.vo.AuthLoginRespVO;
import com.huaboot.system.vo.SysUserTokenVO;
import com.huaboot.system.query.SysUserTokenQuery;
import com.huaboot.system.entity.SysUserTokenEntity;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 用户Token
 *
 * @author ff xxx
 * @since 1.0.0 2023-09-04
 */
public interface SysUserTokenService  extends IService<SysUserTokenEntity>{

    PageResult<SysUserTokenVO> page(SysUserTokenQuery query);

    void save(SysUserTokenVO vo);

    void update(SysUserTokenVO vo);

    void delete(List<Long> idList);

    void updateExpireToken(Long userId);

    AuthLoginRespVO createTokenUserInfo(LoginUser loginUser);
    AuthLoginRespVO refreshToken(String refreshToken);

    void updateCacheAuthByRoleId(Long id);

    void updateCacheAuthByUserId(Long userId);
}
